package com.example.shop.order.typehandler;


import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.example.shop.order.enums.PaymentMethod;

public class PaymentMethodTypeHandler extends JacksonTypeHandler {

    public PaymentMethodTypeHandler() {
        super(PaymentMethod.class);
    }

    @Override
    protected Object parse(String json) {
        return PaymentMethod.getPaymentMethod(Integer.valueOf(json));
    }
}
